You are trying to save a value to a primary key field that is included in a relationship.
In Microsoft« Access, the Cascade Update Related Fields option is selected for the relationship, or in DAO code, the dbRelationUpdateCascade option is specified for the Relation object's Attributes property. Therefore, your application is attempting to update the matching field in the related table.
The matching field cannot be updated because you have it open or locked on your computer. To save the record, you must first close the related table.